package com.study.opensource.spring.loop;

import com.study.opensource.spring.loop.service.AService;
import com.study.opensource.spring.loop.service.BService;
import com.study.opensource.spring.loop.service.CService;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author xubangbang
 * @date 2021/7/9 10:15
 */
@SpringBootApplication
public class SpringLoopApplication {

    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext();
        context.register(SpringLoopApplication.class);
        context.refresh();
        CService c = context.getBean(CService.class);
        BService b = context.getBean(BService.class);
        AService a = context.getBean(AService.class);
        System.out.println("============");
        a.printA();
        System.out.println("============");
        b.printB();
        System.out.println("============");
        c.printC();

    }
}
